//-----------------------------------------------------------------------------
//<filedescription file="ActionsSummaryWizardPageControl.cs" company="Microsoft">
//  <copyright>
//     Copyright (c) 2005, 2010 Microsoft Corporation.  All rights reserved.
//  </copyright>
//  <purpose>
//     Control to be placed on ActionsWizardPage.
//  </purpose>
//  <notes>
//  </notes>
//</filedescription>
//-----------------------------------------------------------------------------

#region Using directives

using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using DevelopStudio.Basic;
using DevelopStudio.Control.Basic;


#endregion

namespace DevelopStudio.Control.Commit
{
    /// <summary>
    /// The control for an ActionsWizardPage.
    /// </summary>
    public partial class ActionsSummaryWizardPageControl : ActionsWizardPageControlBase
    {
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Sets the caption string value.
        /// </summary>
        /// <value></value>
        public override string PageTitle
        {
            set 
            { 
                labelCaption.Text = value;

                panelBanner.Visible = string.IsNullOrEmpty(labelCaption.Text) == true ? false : true;
            }
            get { return labelCaption.Text; }
        }

        /// <summary>
        /// Sets the proceed message string value.
        /// </summary>
        /// <value></value>
        public override string ProceedMessage
        {
            set { labelProceed.Text = value; }
            get { return labelProceed.Text; }
        }

        /// <summary>
        /// Gets the RTF box.
        /// </summary>
        /// <value></value>
        internal override WpfSummaryBox SummaryBox
        {
            get
            {
                return wpfSummaryBox;
            }
        }

        /// <summary>
        /// ctor
        /// </summary>
        public ActionsSummaryWizardPageControl()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            // Add this by hand here because the Method belongs to the base class, and VS Designer gets confused.
            //this.buttonTemplate.Click += new System.EventHandler(this.SaveTemplate);
        }

        /// <summary>
        /// Called when this SmsPageControl is activated.
        /// </summary>
        public override void OnActivated()
        {
            base.OnActivated();

            //Set the message at the top of the page.
            if (string.IsNullOrEmpty(SummaryMessage) == false)
            {
                PageTitle = SummaryMessage;
            }

            //Set the message at the bottom of the page.
            if (string.IsNullOrEmpty(SummaryProceedMessage) == false)
            {
                ProceedMessage = SummaryProceedMessage;
            }
        }

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Component Designer generated code

        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ActionsSummaryWizardPageControl));
            this.labelDescription = new System.Windows.Forms.Label();
            this.elementHostSummaryBox = new System.Windows.Forms.Integration.ElementHost();
            this.wpfSummaryBox = new WpfSummaryBox();
            this.labelProceed = new System.Windows.Forms.Label();
            this.labelCaption = new System.Windows.Forms.Label();
            this.panelBody = new System.Windows.Forms.Panel();
            this.panelBanner = new System.Windows.Forms.Panel();
            this.panelBody.SuspendLayout();
            this.panelBanner.SuspendLayout();
            this.SuspendLayout();
            // 
            // labelDescription
            // 
            resources.ApplyResources(this.labelDescription, "labelDescription");
            this.labelDescription.Name = "labelDescription";
            // 
            // elementHostSummaryBox
            // 
            resources.ApplyResources(this.elementHostSummaryBox, "elementHostSummaryBox");
            this.elementHostSummaryBox.BackColor = System.Drawing.SystemColors.Window;
            this.elementHostSummaryBox.Name = "elementHostSummaryBox";
            this.elementHostSummaryBox.Child = this.wpfSummaryBox;
            // 
            // labelProceed
            // 
            resources.ApplyResources(this.labelProceed, "labelProceed");
            this.labelProceed.Name = "labelProceed";
            // 
            // labelCaption
            // 
            resources.ApplyResources(this.labelCaption, "labelCaption");
            this.labelCaption.Name = "labelCaption";
            // 
            // panelBody
            // 
            this.panelBody.Controls.Add(this.labelDescription);
            this.panelBody.Controls.Add(this.labelProceed);
            this.panelBody.Controls.Add(this.elementHostSummaryBox);
            resources.ApplyResources(this.panelBody, "panelBody");
            this.panelBody.Name = "panelBody";
            // 
            // panelBanner
            // 
            this.panelBanner.Controls.Add(this.labelCaption);
            resources.ApplyResources(this.panelBanner, "panelBanner");
            this.panelBanner.Name = "panelBanner";
            // 
            // ActionsSummaryWizardPageControl
            // 
            this.Controls.Add(this.panelBody);
            this.Controls.Add(this.panelBanner);
            this.Name = "ActionsSummaryWizardPageControl";
            this.panelBody.ResumeLayout(false);
            this.panelBody.PerformLayout();
            this.panelBanner.ResumeLayout(false);
            this.ResumeLayout(false);

        }

        private Label labelCaption;
        private Label labelDescription;
        private System.Windows.Forms.Integration.ElementHost elementHostSummaryBox;
        private WpfSummaryBox wpfSummaryBox;
        private Panel panelBody;
        private Panel panelBanner;
        private Label labelProceed;
        #endregion
    }
}

